import request from '@/utils/request';
import { IMonitoringForceQueryParams } from '@/api/monitoringForce/type';
import { AxiosPromise } from 'axios';

//获取监测力量列表

export function monitoringForceList(query: IMonitoringForceQueryParams): AxiosPromise<any> {
  return request({
    url: `/largescreen/api/largeScree/monitoringForceList`,
    method: 'get',
    params: query
  });
}

//获取监测力量分组(根据参数获取list)
export function getMonitoringForce(query: IMonitoringForceQueryParams) {
  return request({
    url: `/largescreen/api/largeScree/getMonitoringForce`,
    method: 'get',
    params: query
  });
}

//22万感知模组统计接口
export function getTongji() {
  return request({
    url: '/largescreen/api/largeScree/getTongji',
    method: 'get'
  });
}

//入户监测列表
export function getHouseholdMonitoring(query) {
  return request({
    url: `/largescreen/api/largeScree/getHouseholdMonitoring`,
    method: 'get',
    params: query
  });
}

//入户检测操作按钮报警接口
export function getHouseholdMonitoringAlarm(query) {
  return request({
    url: `/largescreen/api/largeScree/getHouseholdMonitoringAlarm`,
    method: 'get',
    params: query
  });
}

//22万感知模组设备各区县安装情况分布
export function getHouseByCounty() {
  return request({
    url: '/largescreen/api/largeScree/getHouseByCounty',
    method: 'get'
  });
}

//22万感知模组各区县设备报警分布分布
export function getAlarmByAlarmCounty() {
  return request({
    url: '/largescreen/api/largeScree/getAlarmByAlarmCounty',
    method: 'get'
  });
}

//22万感知模组各区县各区县设备安装数量和报警数量
export function getAlarmByCountyAndHouse() {
  return request({
    url: '/largescreen/api/largeScree/getAlarmByAlarmRate',
    method: 'get'
  });
}

//22万感知模组各时间报警数量和处置趋势
export function getAlarmByTime() {
  return request({
    url: '/largescreen/api/largeScree/getAlarmByAlarmTime',
    method: 'get'
  });
}

//22万感知模组社区报警和设备数量top10
export function getAlarmByAlarmTop() {
  return request({
    url: '/largescreen/api/largeScree/getAlarmByAlarmTop',
    method: 'get'
  });
}

// 查询隐患类别分析（柱状图）
export function category(query) {
  return request({
    url: '/hyjg/pitfallStatistics/category',
    method: 'get',
    params: query
  });
}
